Skip to content

d_a_npc_maro equivalent#2439

Merged
TakaRikka merged 17 commits intozeldaret:mainfrom
YunataSavior:dev_d_a_npc_maro
Jun 7, 2025
Merged

d_a_npc_maro equivalent#2439
TakaRikka merged 17 commits intozeldaret:mainfrom
YunataSavior:dev_d_a_npc_maro

Conversation

@YunataSavior
Copy link
Copy Markdown
Contributor

@YunataSavior YunataSavior commented May 15, 2025

TP_Malo_Render

@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented May 15, 2025

Report for GZ2E01 (23bee3b - 5ff4250)

📈 Matched code: 63.57% (+0.33%, +37352 bytes)

✅ 90 new matches:
Unit Function Bytes Before After
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutArrowTutorial(int) +5869 0.07% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::wait(void*) +2093 0.19% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutGetWoodSwd(int) +2064 0.19% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutNotGonnaLet(int) +1761 0.23% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpcT_c::daNpcT_c(const daNpcT_faceMotionAnmData_c*, const daNpcT_motionAnmData_c*, const daNpcT_MotionSeqMngr_c::sequenceStepData_c*, int, const daNpcT_MotionSeqMngr_c::sequenceStepData_c*, int, const daNpcT_evtData_c*, char**) +1025 0.39% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutFindMonkey(int) +1004 0.40% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutGiveMeWoodSwd(int) +905 0.44% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::srchActors() +864 0.46% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutTalkToKakashi(int) +769 0.52% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutSwdTutorial(int) +749 0.53% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutMarosWhisper(int) +745 0.53% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::tend(void*) +721 0.55% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::create() +709 0.56% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutSurprise(int) +705 0.56% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::setAttnPos() +652 0.61% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::arrowTutorial(void*) +652 0.61% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::CreateHeap() +641 0.62% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::setParam() +608 0.65% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::action() +601 0.66% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::isDelete() +560 0.71% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::talk(void*) +560 0.71% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::choccai(void*) +545 0.73% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::reset() +541 0.74% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpcT_JntAnm_c::setEyeAngleX(cXyz, float, short) +516 0.77% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutCacaricoConversation(int) +500 0.79% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro __sinit_d_a_npc_maro_cpp +489 0.81% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutConversationAboutWoodSwd(int) +421 0.94% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::cutConversationAboutPachinko(int) +413 0.96% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::talk_withTaro(void*) +396 1.00% 100.00%
d_a_npc_maro/d/actor/d_a_npc_maro daNpc_Maro_c::checkChangeEvt() +389 1.02% 100.00%

...and 60 more new matches

@YunataSavior YunataSavior marked this pull request as draft May 16, 2025 06:53
@YunataSavior YunataSavior changed the title d_a_npc_maro partial decompilation (~17%) d_a_npc_maro WIP (~17%) May 16, 2025
@YunataSavior YunataSavior changed the title d_a_npc_maro WIP (~17%) d_a_npc_maro WIP (~28%) May 31, 2025
@YunataSavior YunataSavior changed the title d_a_npc_maro WIP (~28%) d_a_npc_maro WIP (~57%) Jun 2, 2025
@YunataSavior YunataSavior changed the title d_a_npc_maro WIP (~57%) d_a_npc_maro WIP (~74%) Jun 2, 2025
@YunataSavior YunataSavior changed the title d_a_npc_maro WIP (~74%) d_a_npc_maro WIP (~98%) Jun 5, 2025
@YunataSavior YunataSavior changed the title d_a_npc_maro WIP (~98%) d_a_npc_maro equivalent Jun 7, 2025
@YunataSavior YunataSavior marked this pull request as ready for review June 7, 2025 05:48
Comment thread include/d/actor/d_a_npc_maro.h Outdated
Comment on lines +115 to +117
/* 80564990-805649A0 0094F0 0010+00 1/0 0/0 0/0 .text checkChangeJoint__12daNpc_Maro_cFi */
/* 80564990 */ BOOL checkChangeJoint(int arg0) { return arg0 == 4; };
/* 805649A0-805649B0 009500 0010+00 1/0 0/0 0/0 .text checkRemoveJoint__12daNpc_Maro_cFi */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

symbol comments can be removed

Comment thread src/d/actor/d_a_npc_maro.cpp Outdated
Comment on lines +232 to +233
13072, 13072, 0, 12896, 13088, 13088, 13088, 13072, 13072, 13088, 13072, 13072,
13072, 13072, 13072, 13072, 0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heap sizes are better in hex imo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that means that I'll have to modify my beautify anm data script to spit out hex values for this.

Comment thread src/d/actor/d_a_npc_maro.cpp Outdated
void daNpc_Maro_c::getType() {
// NONMATCHING
u8 daNpc_Maro_c::getType() {
switch ((u8)fopAcM_GetParam(this)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this would look better as fopAcM_GetParam(this) & 0xFF

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the debug rom, turns out it looks like:

u8 param = fopAcM_GetParam(this) & 0xFF;
switch (param) {

Comment thread src/d/actor/d_a_npc_maro.cpp Outdated
|| 0 == strcmp(dComIfGp_getEventManager().getRunEventName(), "CONTINUE_ARROWTUTORIAL")
|| 0 == strcmp(dComIfGp_getEventManager().getRunEventName(), "END_ARROWTUTORIAL")
|| 0 == strcmp(dComIfGp_getEventManager().getRunEventName(), "CLEAR_ARROWTUTORIAL")) {
//
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment can be removed

Comment thread src/d/actor/d_a_npc_maro.cpp Outdated
mDoMtx_stack_c::multVec(&my_vec_0, &my_vec_1);
mGndChk.SetPos(&my_vec_1);
my_vec_1.y = dComIfG_Bgsp().GroundCross(&mGndChk);
JUT_ASSERT(0xDA9, -(1000000000.0f) != my_vec_1.y);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assert doesnt match the debug rom afaict. make sure the variables are named the same as in debug

Comment thread src/d/actor/d_a_npc_maro.cpp Outdated
}

if (mStagger.checkStagger() == 0) {
// mtype switch.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this comment referring to?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an incorrect stub comment that I should have deleted beforehand XD

Fixed all the issues you noted, btw.

@TakaRikka TakaRikka merged commit 09fdb3e into zeldaret:main Jun 7, 2025
1 check passed
@YunataSavior YunataSavior deleted the dev_d_a_npc_maro branch June 22, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants